import {Component, Input} from '@angular/core';
import {NavController} from "ionic-angular";

/**
 * Generated class for the IonRepositoryComponent component.
 *
 * See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html
 * for more info on Angular Components.
 */
@Component({
  selector: 'ion-repository',
  templateUrl: 'ion-repository.html'
})
export class IonRepositoryComponent {
  @Input() repository: Array<any>;

  constructor(public navCtrl: NavController) {
    console.log('Hello IonProducts Component');
  }

  //商品详情
  goDetails(item) {
    console.debug('go details...')
    this.navCtrl.push('RepositoryDetailsPage',{item:item});
  }

}
